package com.more.offer.designpatterns.proxy;

import javax.annotation.processing.SupportedOptions;

/**
 * @author pinoc
 * @date 2021/10/29
 * @description 电影院 代理 电影
 */
public class Cinema implements Movie{

	private Movie movie;

	public Cinema() {
	}

	public Cinema(Movie movie) {
		super();
		this.movie = movie;
	}

	@Override
	public void play() {
		beforePlay();
		movie.play();
		afterPlay();
	}

	private void beforePlay() {
		System.out.println("售卖爆米花。。。");
	}

	private void afterPlay() {
		System.out.println("提供眼睛按摩。。。");
	}
}
